//
// Created by 21577 on 2025/3/4.
//
#include<stdio.h>
int main(){
    int a,b,c,d;
    while(scanf("%d %d %d %d",&a,&b,&c,&d)!=EOF){
        int arr[4]={a,b,c,d};
        int temp,i,j;
        for(i=0;i<3;i++){
            for(j=0;j<3-i;j++){
                if(arr[j]>arr[j+1]){
                    temp = arr[j];
                    arr[j]=arr[j+1];
                    arr[j+1]=temp;
                }
            }
        }
        for(int k=0;k<4;k++){
            printf("%d ",arr[k]);
        }
        printf("\n");
    }
    return 0;
}